package A1;

import javax.swing.JOptionPane;
import javax.swing.*;

/**
 * Created by IntelliJ IDEA.
 * User: Sarah
 * Date: 17/08/2011
 * Time: 2:42:26 PM
 * To change this template use File | Settings | File Templates.
 */

public class adminUI {

    /**
     * Displays the initial options so the program knows how many floors and elevators to display
     * Creates and displays the GUI
     */
    public static void main(String[] args) {

        String numFloor = JOptionPane.showInputDialog("Number of floors", "6");
        String numLift = JOptionPane.showInputDialog("Number of lifts", "1");

        int numOfLift = Integer.parseInt(numLift);
        int numOfFloor = Integer.parseInt(numFloor);

        JFrame frame = new JFrame("elevatorUI Simulator - Sarah Peluchetti, Joseph Marano, Takudzwa Chibisa");
        java.awt.Container container = frame.getContentPane();
        UCGroupController LiftGroup = new UCGroupController(numOfFloor, numOfLift);
        container.add(LiftGroup);
        int Height = LiftGroup.LiftsHeight;
        int Width = LiftGroup.LiftsWidth + 180;
        frame.setSize(Width, Height);
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

	}
}